/*
 * Copyright 2009 Jinbo Lin. All rights reserved.
 * 
 * cn.edu.pku.model OfficeAutomation
 *
 * Created on 2009-12-25
 */
package cn.edu.pku.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Jinbo Lin
 * 
 * 
 */
public class Role implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6279381511129709052L;
	private int roleId;
	private String roleName;
	private User creator;
	private Date dateTime;
	private User auditor;
	private String audit;
	private Date auditDateTime;
	private String removed;
	private String remark;
	
	private Set<Privilege> privileges = new HashSet<Privilege>();
	private Set<User> users = new HashSet<User>();

	/**
	 * @return the roleId
	 */
	public int getRoleId() {
		return this.roleId;
	}

	/**
	 * @param roleId the roleId to set
	 */
	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	/**
	 * @return the roleName
	 */
	public String getRoleName() {
		return this.roleName;
	}

	/**
	 * @param roleName the roleName to set
	 */
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	/**
	 * @return the creator
	 */
	public User getCreator() {
		return this.creator;
	}

	/**
	 * @param creator the creator to set
	 */
	public void setCreator(User creator) {
		this.creator = creator;
	}

	/**
	 * @return the dateTime
	 */
	public Date getDateTime() {
		return this.dateTime;
	}

	/**
	 * @param dateTime the dateTime to set
	 */
	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}

	/**
	 * @return the auditor
	 */
	public User getAuditor() {
		return this.auditor;
	}

	/**
	 * @param auditor the auditor to set
	 */
	public void setAuditor(User auditor) {
		this.auditor = auditor;
	}

	/**
	 * @return the audit
	 */
	public String getAudit() {
		return this.audit;
	}

	/**
	 * @param audit the audit to set
	 */
	public void setAudit(String audit) {
		this.audit = audit;
	}

	/**
	 * @return the auditDateTime
	 */
	public Date getAuditDateTime() {
		return this.auditDateTime;
	}

	/**
	 * @param auditDateTime the auditDateTime to set
	 */
	public void setAuditDateTime(Date auditDateTime) {
		this.auditDateTime = auditDateTime;
	}

	/**
	 * @return the removed
	 */
	public String getRemoved() {
		return this.removed;
	}

	/**
	 * @param removed the removed to set
	 */
	public void setRemoved(String removed) {
		this.removed = removed;
	}

	/**
	 * @return the remark
	 */
	public String getRemark() {
		return this.remark;
	}

	/**
	 * @param remark the remark to set
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * @return the privileges
	 */
	public Set<Privilege> getPrivileges() {
		return this.privileges;
	}

	/**
	 * @param privileges the privileges to set
	 */
	public void setPrivileges(Set<Privilege> privileges) {
		this.privileges = privileges;
	}

	/**
	 * @return the users
	 */
	public Set<User> getUsers() {
		return this.users;
	}

	/**
	 * @param users the users to set
	 */
	public void setUsers(Set<User> users) {
		this.users = users;
	}

	/**
	 * 
	 */
	public Role() {
	}

	/**
	 * @param roleId
	 * @param roleName
	 * @param creator
	 * @param dateTime
	 */
	public Role(int roleId, String roleName, User creator, Date dateTime) {
		this.roleId = roleId;
		this.roleName = roleName;
		this.creator = creator;
		this.dateTime = dateTime;
	}

	/**
	 * @param roleId
	 * @param roleName
	 * @param creator
	 * @param dateTime
	 * @param auditor
	 * @param audit
	 * @param auditDateTime
	 * @param removed
	 * @param remark
	 */
	public Role(int roleId, String roleName, User creator, Date dateTime,
			User auditor, String audit, Date auditDateTime,
			String removed, String remark) {
		this.roleId = roleId;
		this.roleName = roleName;
		this.creator = creator;
		this.dateTime = dateTime;
		this.auditor = auditor;
		this.audit = audit;
		this.auditDateTime = auditDateTime;
		this.removed = removed;
		this.remark = remark;
	}
	
}
